<#include "../common/constant.ftl" />
<title>推送消息列表</title>
<div class="row">
	<div class="col-xs-12">
		<div class="table-responsive">
			<table id="sample-table-1" class="table table-striped table-bordered table-hover">
				<thead>
					<tr>
						<th class="center" width="5%">ID</th>
						<th class="center" width="14%">推送消息标题</th>
						<!-- <th class="center" width="6%">推送终端</th> -->
						<th class="center">推送设备</th>
						<th class="center width-30" width="30%">内容</th>
						<th class="center width-20" width="20%">协议</th>
						<th class="center" width="10%">推送终端>时间</th>
					</tr>
				</thead>
				<tbody>
				<#list pager.itemList as u>
					<tr>
						<td class="center"><span class="green center">${u.id}</span></td>
						<td class="center">
						<a href="#modalTable_${u.id}" class="link" role="button" data-toggle="modal">${(u.thumbTitle)?html}</a>
						<div id="modalTable_${u.id}" class="modal fade" tabindex="-1">
							<div class="modal-dialog">
								<div class="modal-content">
									<div class="modal-header no-padding">
										<div class="table-header">
											<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
												<span class="white">×</span>
											</button>
										</div>
									</div>
						
									<div class="modal-body">
										<script>
											var fetch = '${(u.fetchDetail)!}';
											try {
												var j = JSON.parse(fetch);
												//document.write("<pre>" + JSON.stringify(j, null, 4) + "<br/></pre>");
												document.write(JSON.stringify(j, null, 4));
											} catch(e) {
												document.write(fetch);
											}
										</script>
									</div>
								</div><!-- /.modal-content -->
							</div><!-- /.modal-dialog -->
						</div>
						</td>
						<!-- <td class="center">${terminalOptions[u.terminal]!}</td> -->
						<td class="center">${deviceTypeOptionsAll[u.deviceType]!} <#if "ids" == u.deviceType>ID: [${tagUtils.cutString(u.terminalIds, 64)}]</#if></td>
						<td class="center">${(u.content!)?html}</td>
						<td class="center">${(u.url!)?html}</td>
						<td class="center">${tagUtils.formatDate(u.recordCreateTime)}</td>
					</tr>
				</#list>
				</tbody>
			</table>
		</div><!-- /.table-responsive -->
		
		<div class="hr hr-18 dotted hr-double"></div>
		<@h.page pager=pager action="${ctx}/admin/notice_push/list${suffix}" />
	</div><!-- /span -->
</div><!-- /row -->
<script>

$(document).ready(function(){
	RP.Breadcrumbs.add("${ctx}/admin/jpush/add${suffix}", "新增推送消息");
});
</script>